package com.charles.export;


import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.charles.export.annotation.Column;
import com.charles.export.annotation.Export;

@Export(sheetName = "student")
public class Student {

	private String school;

	private String name;

	private Date birthday;

	private int age;

	private double salary;

	@Column(pos = 1, head = "姓名")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(pos = 5, head = "年龄")
	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	@Column(pos = 2, head = "学校")
	public String getSchool() {
		return school;
	}

	public void setSchool(String school) {
		this.school = school;
	}

	
	public Date getBirthday() {
		return birthday;
	}
	@Column(pos = 4, head = "出生年月")
	public String getShowBirthday() {
		DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return format.format(birthday);
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public double getSalary() {
		return salary;
	}

	public void setSalary(double salary) {
		this.salary = salary;
	}

	@Column(head = "薪水", pos = 3)
	public String getShowSalary() {
		return "$ " + getSalary();
	}
}
